package com.jcj.jcjmq.client;

import com.jcj.jcjmq.model.Message;
import lombok.AllArgsConstructor;

@AllArgsConstructor
public class JcjProducer {

    private JcjBroker broker;

    public boolean send(String topic, Message message) {
        return broker.send(topic, message);
//        JcjMq mq = broker.find(topic);
//        if(mq == null){
//            throw new RuntimeException("topic not found");
//        }
//        return mq.send(message);
    }
}
